﻿Public Class webAdmin


    Public adminURL As String = ""

    Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If adminURL = "" Then
            MessageBox.Show("No URL Specified. Cannot Proceed.")
            Me.DialogResult = Windows.Forms.DialogResult.Cancel
            Me.Close()
        End If
        If My.Computer.Network.IsAvailable = False Then
            MessageBox.Show("No network", "Error")
            Me.DialogResult = Windows.Forms.DialogResult.Cancel
            Me.Close()
        End If
        Me.AcceptButton = btnOK
        Me.CancelButton = btnCancel
        Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedDialog
        Me.HelpButton = True
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.ShowIcon = False
        Me.StartPosition = FormStartPosition.CenterScreen

        WebBrowser1.Url = New Uri(adminURL)
    End Sub


    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        Me.DialogResult = Windows.Forms.DialogResult.OK
    End Sub

    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        Me.DialogResult = Windows.Forms.DialogResult.Cancel
    End Sub

End Class